package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaFaq;
import com.ruoyi.system.mapper.JiajiaFaqMapper;
import com.ruoyi.system.service.IJiajiaFaqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 常见问题Service业务层处理
 * 
 * @author knd
 * @date 2021-10-13
 */
@Service
public class JiajiaFaqServiceImpl implements IJiajiaFaqService
{
    @Autowired
    private JiajiaFaqMapper jiajiaFaqMapper;

    /**
     * 查询常见问题
     * 
     * @param id 常见问题主键
     * @return 常见问题
     */
    @Override
    public JiajiaFaq selectJiajiaFaqById(Long id)
    {
        return jiajiaFaqMapper.selectJiajiaFaqById(id);
    }

    /**
     * 查询常见问题列表
     * 
     * @param jiajiaFaq 常见问题
     * @return 常见问题
     */
    @Override
    public List<JiajiaFaq> selectJiajiaFaqList(JiajiaFaq jiajiaFaq)
    {
        return jiajiaFaqMapper.selectJiajiaFaqList(jiajiaFaq);
    }

    /**
     * 新增常见问题
     * 
     * @param jiajiaFaq 常见问题
     * @return 结果
     */
    @Override
    public int insertJiajiaFaq(JiajiaFaq jiajiaFaq)
    {
        return jiajiaFaqMapper.insertJiajiaFaq(jiajiaFaq);
    }

    /**
     * 修改常见问题
     * 
     * @param jiajiaFaq 常见问题
     * @return 结果
     */
    @Override
    public int updateJiajiaFaq(JiajiaFaq jiajiaFaq)
    {
        return jiajiaFaqMapper.updateJiajiaFaq(jiajiaFaq);
    }

    /**
     * 批量删除常见问题
     * 
     * @param ids 需要删除的常见问题主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaFaqByIds(String ids)
    {
        return jiajiaFaqMapper.deleteJiajiaFaqByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除常见问题信息
     * 
     * @param id 常见问题主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaFaqById(Long id)
    {
        return jiajiaFaqMapper.deleteJiajiaFaqById(id);
    }
}
